package com.job.Gai_Yian.Homework0705;

/**
 * @author Gai_Yian
 * @version 1.0
 * @since 2022-07-07 13:02:40
 */
public class Number {
    public static void main(String[] args){
        int sum=0;
        for (int i=100;i<=999;i++){
            int a=i%10;         //个位数
            int b=i/10%10;      //十位数
            int c=i/100%10;     //百位数
            if(a>=1 & b>=1 & c>=1 & a<=4 & b<=4 & c<=4){
                if (a!=b & b!=c & c!=a){
                    System.out.println(i);
                    sum++;
                }
            }
        }
        System.out.println("能组成"+sum+"个互不相同且无重复数字的三位数");
    }
}
